

package database;

import java.sql.Connection;

/**
 * mySQl factory used to load mySQL driver for JDBC
 *
 * @author Rick
 */
public class MySqlDAOFactory extends DAOfactory {

    public static SQLConfigeration sqlConfigeration;
    public static Connection conn;

    public MySqlDAOFactory(){
        sqlConfigeration = new SQLConfigeration();
    }

    //method to create mysql connection
    public static Connection createConnection(){
        conn = SQLConfigeration.getConnection();
        return conn;
    }

    @Override
    public ConnectionDAO getConnectionDAO() {
        return new mySQLConnectionDAO();
    }

    @Override
    public UsedDAO getUsedDAO() {
        return new mySQLUsedDAO();
    }

    @Override
    public VisualizationDAO getVisualizationDAO() {
        return new mySQLVisualizationDAO();
    }

}
